1. Field of the Invention
The present invention relates to a communication apparatus, a printing apparatus, a printing system that includes the communication apparatus and printing apparatus, and methods of controlling the communication apparatus and printing apparatus.
2. Description of the Related Art
Direct printing, in which a printer is caused to print image data upon transmitting the image data to the printer from various mobile devices typified by cellular phones and digital cameras, has become widespread in recent years. Examples of communication protocols used in case of direct printing include PictBridge, IrDA and Bluetooth, etc. With direct printing, at first it was possible to print only photographic data or specific-format data typified by vCard and vCalendar. Now, however, it is possible to print based upon methods defined by the Basic Printing Profile (referred to as “BPP” below) of Bluetooth. As a result, devices that exchange data in the XHTML-Print format handled at the same time as documents and photographs have appeared on the market.
The BPP communication protocol defines various methods through which a printer responds to a mobile device with its status, as well as a variety of examples of status capable of serving as responses. However, what has been defined as such answerable status is limited to the most general. For example, although status to the effect that a printer has run out of ink has been defined, information as to the color of the ink that has run out has not been defined. With this method, therefore, it is not possible to add on various status information, and vendors are prohibited from defining their own originally defined status and adding it to the protocol. Furthermore, a field in which a vendor's own original information can be described also has not been defined. This makes it impossible for a vendor to add on desired features.
A technique for exchanging original information by using a communication protocol in which exchange of such originally defined information has not been defined has been proposed in Japanese Patent Application Laid-Open No. 2004-303194. According to this technique, if an extended function exists in the protocol of a direct printing system (DPS), notification of the extended function is given beforehand when capability information is acquired. When a DPS function is subsequently executed, a tag relating to the extended function is added to the tag of the DPS function defined in XML, and a designation relating to the additional function is made. Besides a technical solution, there is a solution based upon a method in which an agreement relating to information to be newly added on and the method of acquiring this information is made between vendors who implement a BPP connection, and communication is then performed in accordance with this agreement.
According to the BPP communication protocol, the describing of a certain type of information in a specific field of OBEX, which is a protocol of a lower level of BPP, is the only method that is allowed as a method of exchanging such original information. However, the field has been defined only for data that is text-format data; the description can be made freely in terms of the purpose thereof, when it was made and what the content is. Accordingly, there is the danger that content described by a certain vendor will be interpreted completely differently by the device of another vendor. For example, there is concern that described content will be displayed as is to user or, in a worst-case scenario, that a problem will occur at the time of a connection, e.g., disconnect or hang-up, owing to analysis failure. Consequently, it may be difficult for the header to be used by the vendor itself and the state of affairs is such that printer status defined by the vendor itself using the header cannot be sent back as a response.
Although it is possible to solve this problem by a method in which an agreement is reached between vendors that implement a BPP connection, this method requires a great deal of time for the agreement itself. Further, there is the likelihood that problems will arise in a case where the device of the other party is the device of a vendor that is not participating in the agreement, or in a case where the device of the other party is one that was a participant before the agreement was reached. Often the agreement employs a method in which negotiation for verifying each other's capabilities is performed at the time of connection. However, if such new negotiations are provided, there is the danger that the very data for the negotiation will cause problems in a case where the other party's device does not know of the data.
Further, according to the method set forth in Japanese Patent Application Laid-Open No. 2004-303194 cited above, notification of information concerning extended functions is given when capability information is acquired. With BPP at the present time, however, means for notifying of such information relating to extended functions do not exist. If a specific field of OBEX is used in order to notify of this information, there is the danger that a problem will arise that is similar to that when notification of status information is given. Accordingly, since notification relating to extended functions cannot be given in advance, the method disclosed in Japanese Patent Application Laid-Open No. 2004-303194 cannot be employed. Furthermore, a method of specifying an extended function by adding on an XML tag indicated in Japanese Patent Application Laid-Open No. 2004-303194 is such that in communication with an unspecified party whose ability to analyze XML is unknown, assurance as to how the device of the other party will operate cannot be obtained. For example, with XML, in order to avoid confusion in which elements or attributes having the same name are defined by different meanings, a name space is utilized. If processing is not executed upon detecting the range over which the name space extends, a mistake will occur in interpretation. In addition, the ability of a parser that interprets and processes XML is not only that set forth in the specifications of W3C, and some parsers have their functions limited to the minimum necessary. Consequently, XML will not necessarily be interpreted as expected.